import request from '@/utils/request'

// 查询小程序-商城订单列表
export function listOrder(query) {
  return request({
    url: '/xxc/order/list',
    method: 'get',
    params: query
  })
}

// 查询小程序-商城订单详细
export function getOrder(id) {
  return request({
    url: '/xxc/order/' + id,
    method: 'get'
  })
}

// 新增小程序-商城订单
export function addOrder(data) {
  return request({
    url: '/xxc/order',
    method: 'post',
    data: data
  })
}

// 修改小程序-商城订单
export function updateOrder(data) {
  return request({
    url: '/xxc/order',
    method: 'put',
    data: data
  })
}

// 删除小程序-商城订单
export function delOrder(id) {
  return request({
    url: '/xxc/order/' + id,
    method: 'delete'
  })
}

// 同意退款
export function successBackGoods(data) {
  return request({
    url: '/order/goods/successBackGoods',
    method: 'post',
    data: data
  })
}

// 拒绝退款
export function noBackGoods(data) {
  return request({
    url: '/order/goods/noBackGoods',
    method: 'post',
    data: data
  })
}
